﻿using Adnc.Infra.Entities;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace WYT.Sys.Repository.Entities
{
    /// <summary>
    /// 地区
    /// </summary>
    [Table("sys_Area"), Comment("地区"), Index(nameof(Parent_Code)), Index(nameof(Code))]
    public class Area : EfEntity
    {
        /// <summary>
        /// 编码
        /// </summary>
        [Comment("编码"), MaxLength(9)]
        public string Code { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [Comment("名称"), MaxLength(50)]
        public string Name { get; set; }

        /// <summary>
        /// 上级编码
        /// </summary>
        [Comment("上级编码"), MaxLength(6)]
        public string Parent_Code { get; set; }

        /// <summary>
        /// 层级
        /// </summary>
        [Comment("层级"), MaxLength(6)]
        public int Level { get; set; }
    }
}
